{% include "header.html" %}
<div id="wrapper">
	<div id="simple-content-wrapper">
		<div id="content">
		<p>
		<a href="/place/add">添加新的地区</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="#" onclick="javascript:window.open('/map/', '_blank', 'width=850,height=650,menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=Yes')">查看全国地图 (Powered By Google Map)</a>
		</p>
		{% if is_paginated %}
                    {% ifequal current_page 1 %}
                    {% else %} <a href="?page=1"><img src="/medias/images/first.png" border="0" width="16" height="16" alt="转到第一页" /></a>
                    {% endifequal %}
                    {% if has_previous %} <a href="?page={{ previous }}"><img src="/medias/images/previous.png" border="0" width="16" height="16" alt="上一页" /></a>
                    {% else %} <img src="/medias/images/previous.png" width="16" height="16" border="0" alt="上一页" />
                    {% endif %}
                    {% for p in page_numbers %}
                        <a href="?page={{ p }}">{{ p }}</a>
                    {% endfor %}
                    {% if has_next %}<a href="?page={{ next }}"><img src="/medias/images/next.png" border="0" width="16" height="16" alt="下一页" /></a>
                    {% else %}<img src="/medias/images/next.png" border="0" width="16" height="16" alt="下一页" />
                    {% endif %}
                    {% ifequal current_page pages %}<img src="/medias/images/last.png" border="0" width="16" height="16" alt="转到最后一页" />
                    {% else %} <a href="?page={{ pages }}"><img src="/medias/images/last.png" border="0" width="16" height="16" alt="转到最后一页" /></a>
                    {% endifequal %}
                    &nbsp;&nbsp;
                    当前页：{{ page }}/{{ pages }}
                    &nbsp;&nbsp;
					{% endif %}              
					共[&nbsp;{{ hits }}&nbsp;]个地区描述
		{% load ad_tags %}
		{% flash %}
		 <h2>{{ params.type }}</h2>
		{{ msg }}
		{% endflash %}
		<table cellspacing="0" border="0">
		<caption>
		地区列表
		</caption>
		<tr>
			<td>地区名称</td>
			<td>上级地区</td>
			<td>&nbsp;</td>
		</tr>
		{% for x in object_list %}
		<tr class="{% cycle alt,'' %}">
			<td><a href="/place/{{ x.id }}/">{{ x.place_name|capfirst  }}</a></td>
			<td><a href="/place/parent/{{ x.place_parent_id }}/">{{ x.place_parent }}</td>
			<td><a href="#"><img src="/medias/images/del.png" width="16" height="16" border="0" alt="删除该地区" onclick="javascript:if (window.confirm('确认删除此地区?\n\n该地区被删除后有可能造成不可恢复的错误')){location.href='/place/{{ x.id }}/del/'}"></a></td>
		</tr>
		{% endfor %}
		</table>
		{% if is_paginated %}
                    {% ifequal current_page 1 %}
                    {% else %} <a href="?page=1"><img src="/medias/images/first.png" border="0" width="16" height="16" alt="转到第一页" /></a>
                    {% endifequal %}
                    {% if has_previous %} <a href="?page={{ previous }}"><img src="/medias/images/previous.png" border="0" width="16" height="16" alt="上一页" /></a>
                    {% else %} <img src="/medias/images/previous.png" width="16" height="16" border="0" alt="上一页" />
                    {% endif %}
                    {% for p in page_numbers %}
                        <a href="?page={{ p }}">{{ p }}</a>
                    {% endfor %}
                    {% if has_next %}<a href="?page={{ next }}"><img src="/medias/images/next.png" border="0" width="16" height="16" alt="下一页" /></a>
                    {% else %}<img src="/medias/images/next.png" border="0" width="16" height="16" alt="下一页" />
                    {% endif %}
                    {% ifequal current_page pages %}<img src="/medias/images/last.png" border="0" width="16" height="16" alt="转到最后一页" />
                    {% else %} <a href="?page={{ pages }}"><img src="/medias/images/last.png" border="0" width="16" height="16" alt="转到最后一页" /></a>
                    {% endifequal %}
                    &nbsp;&nbsp;
                    当前页：{{ page }}/{{ pages }}
                    &nbsp;&nbsp;
					{% endif %}              
					共[&nbsp;{{ hits }}&nbsp;]个地区描述
		</div>
	</div>
<!-- 	<div id="sidebar-wrapper">
		
			<div id="sidebar">
				
			</div>
		
	</div> -->
</div>
{% include "footer.html" %}
